public class Funiction1 {
    public static void main(String[] args){
        System.out.println(num(12,20));
        System.out.println(num(12,20,20.5));
        System.out.println(num(12,20,30,5));
    }
    public static int num(int a,int b){
        int value=a>b?a:b;
        return value;
    }
    //重载num方法
    public static int num(int a,int b,double c){
        int value=a+b+(int)c;
        return value;
    }
    public static int num(int a,int b,int c,int d){
        int value=a+b+c+d;
        return value;
    }
}
